Skip to content

Add spline compatibility check helper #878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 24, 2025

Conversation

yasahi-hpc
Copy link
Member

This PR aims at a helper to check the consistency of spline builder and evaluator.
For some reason, I need double parentheses to use ASSERT_FALSE like
ASSERT_FALSE((ddc::is_spline_compatible_v<Builder2D_1, Builder2D_1>));

Copy link

codecov bot commented Jun 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.00%. Comparing base (cab321d) to head (8e8fc2c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #878   +/-   ##
=======================================
  Coverage   94.00%   94.00%           
=======================================
  Files          55       55           
  Lines        2720     2720           
  Branches      852      852           
=======================================
  Hits         2557     2557           
  Misses         87       87           
  Partials       76       76           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yasahi-hpc
Copy link
Member Author

@tpadioleau

Following changes are needed?

  1. Only expose is_<check>_v
  2. Add docs to is_<check>_v
  3. Use parentheses to &&?
template <class Builder, class Evaluator>
 struct is_spline_compatible<Builder, Evaluator,
        std::enable_if_t<is_spline_builder_v<Builder> && is_spline_evaluator_v<Evaluator>
                         || is_spline_builder_v<Evaluator> && is_spline_evaluator_v<Builder> >>

Should be

template <class Builder, class Evaluator>
 struct is_spline_compatible<Builder, Evaluator,
        std::enable_if_t<(is_spline_builder_v<Builder> && is_spline_evaluator_v<Evaluator>)
                         || (is_spline_builder_v<Evaluator> && is_spline_evaluator_v<Builder>) >>

@tpadioleau
Copy link
Member

@tpadioleau

Following changes are needed?

  1. Only expose is_<check>_v

You can keep is_<check> in the current namespace as the other traits. We can put them in a detail namespace later.

  1. Add docs to is_<check>_v

Yes please

  1. Use parentheses to &&?

Yes I guess the point of the linter is to clarify the intent.

@yasahi-hpc
Copy link
Member Author

@tpadioleau
Following changes are needed?

  1. Only expose is_<check>_v

You can keep is_<check> in the current namespace as the other traits. We can put them in a detail namespace later.

OK

  1. Add docs to is_<check>_v

Yes please

What kind of docstrings do you prefer?
I could not see docs for these constants.
is_chunk_v

  1. Use parentheses to &&?

Yes I guess the point of the linter is to clarify the intent.

OK

@yasahi-hpc yasahi-hpc force-pushed the check-compatibility-of-splines branch from 64b4312 to b33f82c Compare June 23, 2025 14:20
@yasahi-hpc
Copy link
Member Author

@tpadioleau Can you format this
clangformat 20 is unavailable on my env

@tpadioleau
Copy link
Member

@tpadioleau Can you format this clangformat 20 is unavailable on my env

Done

@yasahi-hpc yasahi-hpc requested a review from tpadioleau June 23, 2025 16:09
Copy link
Member

@tpadioleau tpadioleau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! Just a few comments about the form. Can you also add your name to the authors ?

@yasahi-hpc yasahi-hpc force-pushed the check-compatibility-of-splines branch from 67967c7 to 497af68 Compare June 24, 2025 04:56
@yasahi-hpc yasahi-hpc requested a review from tpadioleau June 24, 2025 06:30
Copy link
Member

@tpadioleau tpadioleau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final change and we are good

@tpadioleau tpadioleau merged commit bb71594 into main Jun 24, 2025
75 checks passed
@tpadioleau tpadioleau deleted the check-compatibility-of-splines branch June 24, 2025 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants